using System;
using System.Collections.Generic;
using System.Text;

namespace DDW
{
	public class MemberAccessExpression : PrimaryExpression, IType
	{
		public MemberAccessExpression()
		{
		}
		public MemberAccessExpression(IMemberAccessible left, IdentifierExpression identifier)
		{
			this.left = left;
			this.identifier = identifier;
		}

		private IdentifierExpression identifier;
		public IdentifierExpression Identifier
		{
			get { return identifier; }
			set { identifier = value; }
		}

		private IMemberAccessible left;
		public IMemberAccessible Left
		{
			get { return left; }
			set { left = value; }
		}

		private List<int> rankSpecifiers = new List<int>();
		public List<int> RankSpecifiers
		{
			get { return rankSpecifiers; }
			set { rankSpecifiers = value; }
		}

		public override void ToSource(StringBuilder sb)
		{
			left.ToSource(sb);
			sb.Append(".");
			identifier.ToSource(sb);
		}
	}
}
